<template>
<div>
<!--  {{this.order}}-->
  <h1 style="background-color: blue;text-align: center;color: white">订单详情</h1>
  <h3>{{this.order.orderStatus==='已使用'?'订单完成':'订单待完成'}}</h3>
      <div>{{ this.order.dingdanName }}</div>
        <img :src="this.order.imgUrl" alt="图片未加载" width="150px" height="150px">
          预定服务：{{this.order.orderType==='景点门票'?'观赏，导游':this.order.orderType==='酒店住宿'?'住宿':this.order.orderType==='美食'?'美食':'按摩'}}
          <span class="price">¥{{ this.order.totalPrice}}</span>
    <div class="contact-merchant">
      <div class="contact-title">联系商家</div>
      <div class="contact-message">感谢您对xx平台的信任，期待再次光临。</div>
      <div class="contact-buttons">
        <div class="el-icon-circle-plus-outline" style="width: 85px;text-align: center"></div>
        <div class="el-icon-phone"></div>
        <br>
        <button @click="reorder">再来一单</button>
        <button @click="contact">联系商家</button>
      </div>
    </div>
    <div class="order-details">
      <div class="order-details-title">订单信息</div>
      <div class="order-detail-item">订单号：{{ order.orderNo }}</div>
      <div class="order-detail-item">购买手机号： 1788879787</div>
      <div class="order-detail-item">付款时间：{{ order.orderTime }}</div>
      <div class="order-detail-item">数量：{{ 1 }}</div>
      <div class="order-detail-item">订单总价：¥{{ order.totalPrice }}</div>
      <ul>
        <li>核销前随时退、过期退</li>
        <li>核销后退款需经商家审核通过，还请提前联系商家确认</li>
      </ul>
    </div>
</div>
</template>

<style scoped>

</style>
<script>
const url='http://localhost:1000/'
export default {
  name: "Xq",
  data() {
    return {
      id:'',
      order:{}
    };
  },
  created() {
    // this.order=this.$route.query.order;
    // console.log(this.$route.query.order);
    this.id=this.$route.query.id;
    console.log(this.id);
    this.xqinfo();
  },
  methods: {
  xqinfo(){
    this.axios.post(url+'order/findById?id='+this.id).then(res=>{
      console.log(res.data)
      this.order=res.data.data;
    })
  }
  }
}
</script>
